]> dgit.raspbian.org Git - gnome-shell.git/commit
windowManager: Discard workspace scroll smooth events
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 23 Aug 2021 16:30:02 +0000 (18:30 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 1 Sep 2021 17:25:01 +0000 (17:25 +0000)
commit757e766a111d2babb0a693e6a07b2d06ab0499ae
tree5b4ce3f0103b69a8055b5bae8c90b586dba4f764
parentcd1102ff30b134e45e9b5ab48318e6a4eae03416
windowManager: Discard workspace scroll smooth events

Since touchpad smooth scroll events with source finger are handled by
the swipeTracker, the workspace scroll handler can focus on discrete
events.

Thanks to Mutter emulating discrete scroll events, see
meta_seat_impl_notify_scroll_continuous_in_impl in meta-seat-impl.c,
it is safe to ignore smooth scroll in the workspace scroll handler
and handle exclusively discrete events.

In addition, once high-resolution scroll events land in Mutter [1], a
mouse will be able generate non emulated smooth scroll events that
should be ignored in favour of the discrete scroll events.
Otherwise, a single mouse wheel click will scroll through multiple
workspaces at once.

[1] https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1962

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1959>
js/ui/windowManager.js